<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head th:replace="dashboard/header :: header"></head>
<body>

<!--
@desc IP和项目名的对应关系 添加
@author WeiXiaoJin
@since 2020-01-26 09:30:11
-->
	<div layout:fragment="content">
		<div class="container-fluid content-main">
			<div class="animated fadeIn">
				<div class="row">
					<!-- /.col-->
					<div class="col-sm-12">
						<div class="card">
							<div class="card-body">
								<form class="form-horizontal" id="addForm">
<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">部署机器IP</label>
	<div class="col-md-9">
				<input class="form-control" id="ip" type="text" name="ip" placeholder="部署机器IP">
			</div>
</div>
												<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">部署机器对应的项目名</label>
	<div class="col-md-9">
				<input class="form-control" id="domain" type="text" name="domain" placeholder="部署机器对应的项目名">
			</div>
</div>
												<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">机器域名</label>
	<div class="col-md-9">
				<input class="form-control" id="hostname" type="text" name="hostname" placeholder="机器域名">
			</div>
</div>
												<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">creationDate</label>
	<div class="col-md-9">
				<div class="input-group date">
			<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
			<input type="text" class="form-control time-input" 
			       id="laydate-demo-3" 
			       name="creationDate" 
			       data-type="datetime" 
			       data-format="yyyy-MM-dd HH:mm:ss" 
			       placeholder="yyyy-MM-dd HH:mm:ss" lay-key="3">
		</div>
			</div>
</div>
																		<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">lastModifiedDate</label>
	<div class="col-md-9">
				<div class="input-group date">
			<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
			<input type="text" class="form-control time-input" 
			       id="laydate-demo-3" 
			       name="lastModifiedDate" 
			       data-type="datetime" 
			       data-format="yyyy-MM-dd HH:mm:ss" 
			       placeholder="yyyy-MM-dd HH:mm:ss" lay-key="3">
		</div>
			</div>
</div>
																									</form>
							</div>
						</div>
					</div>
					<!-- /.col-->
				</div>
			</div>
		</div>

	</div>

	<footer th:replace="dashboard/footer :: footer"></footer>

	<script type="text/javascript">
		var addForm = $("#addForm") ; 
		$(function(){
			addForm.validate({
				ignore: [],  
				rules: {
ip: {required:true}
,domain: {required:true}
,hostname: {required:true}
,creationDate: {required:true,date:true}
,lastModifiedDate: {required:true,date:true}
				}
			});
		}) ;

		function submitHandler() {
			var result = $.validate.form("addForm");
			if(result){	
				var saveUrl = ctx+"base/logger/logHostinfo/save" ;
				$.operate.save(saveUrl , addForm.serialize());
			}
	    }
	</script>

</body>
</html>


